'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview 成就
 * @author sundbcn@gmail.com (sun debing)
 */

var dataApi = require('../libs/dataApi');

/**
 * 根据ID获取体力对应消耗钻石数量
 * @param  {[type]} vip [description]
 * @return {[type]}     [description]
 */
exports.getConf = function (buy_sp_num) {
    var vip_conf = dataApi.sp_shop.findById(buy_sp_num + 1);
    if (!vip_conf) {
        console.error('vip_conf id can not found:' + buy_sp_num);
        return 0;
    }
    return vip_conf.cost_point;
};

/**
 * 根据ID获取精力对应消耗钻石数量
 * @param  {[type]} vip [description]
 * @return {[type]}     [description]
 */
exports.getConfSmithyEnergy = function (buy_energy_num) {
    var vip_conf = dataApi.energy_shop.findById(buy_energy_num);
    if (!vip_conf) {
        console.error('vip_conf id can not found:' + buy_energy_num);
        return 0;
    }
    return vip_conf.cost_point;
};
